<script setup>
import { ref, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
const _id = ref('')
onMounted(() => {
  console.log(route.query)
  _id.value = route.query.id
})
const goback = () => {
  router.go(-1)
}
</script>

<template>
  <div class="p-[10px] space-y-[10px]">
    <div>id为：{{ _id }}</div>
    <el-button type="primary" @click="goback">返回</el-button>
  </div>
</template>
